package com.explore.demo.service;

import com.explore.demo.common.ServerResponse;
import com.explore.demo.pojo.CollectRelation;
import com.baomidou.mybatisplus.extension.service.IService;
import com.explore.demo.pojo.Department;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author gaolainan
 * @since 2021-04-21
 */
public interface CollectRelationService extends IService<CollectRelation> {

    /**
     * 创建一个 用户收藏的招聘信息
     * @param collectRelation
     * @return
     */
    public ServerResponse addCollectRelation(CollectRelation collectRelation);

    /**
     * 通过招聘信息的id  删除对应用户收藏信息
     * @param recruitId
     * @return
     */
    public ServerResponse deleteByRecruitId(Integer recruitId, HttpServletRequest request);

    /**
     * 查询全部的用户收藏信息
     * @return
     */
    public ServerResponse queryAll();

    /**
     * 根据用户的id查询用户收藏的所有招聘信息
     * @param userId
     * @return
     */
    public ServerResponse queryAllByUserId(Integer userId);

    /**
     * 更新用户收藏的信息
     * @param collectRelation
     * @return
     */
    public ServerResponse updateCollectRelation(CollectRelation collectRelation);
}
